const app = getApp()

Page({
  data: {
    list: [
      {
        id: -2,
        txt: 'worklet动画',
        url: '/pages/learn-demo/worklet/index',
      },
      {
        id: -1,
        txt: 'demo-double-tap',
        url: '/pages/learn-demo/demo-double-tap/index',
      },
      {
        id: 0,
        txt: 'demo-drag',
        url: '/pages/learn-demo/demo-drag/index',
      },
      {
        id: 1,
        txt: 'demo-nest',
        url: '/pages/learn-demo/demo-nest/index',
      },
      {
        id: 2,
        txt: 'demo-scale',
        url: '/pages/learn-demo/demo-scale/index',
      },
      {
        id: 3,
        txt: 'demo-proxy-native-view',
        url: '/pages/learn-demo/demo-proxy-native-view/index',
      },
      {
        id: 4,
        txt: 'demo-negotiation',
        url: '/pages/learn-demo/demo-negotiation/index',
      },
    ],
  },
  onLoad() {
    console.log(
      '代码片段是一种迷你、可分享的小程序或小游戏项目，可用于分享小程序和小游戏的开发经验、展示组件和 API 的使用、复现开发问题和 Bug 等。可点击以下链接查看代码片段的详细文档：'
    )
    console.log(
      'https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/devtools.html'
    )
  },

  jump(evt) {
    const url = evt.currentTarget.dataset.url
    wx.navigateTo({
      url,
    })
  },
})
